package cac.fenjian.resource.tsuser.dao;

import cac.fenjian.resource.TsUser.dto.TsUserDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.HashMap;

@Mapper
@Repository
public interface TsUserDao {
    //返回一个TsUserDTO对象给sevice调用并核对用户名和密码
    public TsUserDTO findByAccountAndPassword(@Param("account") String account, @Param("password") String password);
   //修改密码
    public Integer changePassword(@Param("account") String account, @Param("password") String password,@Param("newPwd")String newPwd);

    Integer searchAdministratorIp(@Param("IP") String IP);

    //查询旧密码是否一致
    int searchOldPwd(@Param("oldPwd")String oldPwd,@Param("account") String account);

    HashMap getUserInfoByAccount(@Param("account") String account);
}
